<%--
  Created by IntelliJ IDEA.
  User: aug_liu
  Date: 2021/2/26
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>First Demo</title>
    <link href="img/favicon.ico" rel="shortcut icon">

    <link href="./bootstrap-4.6.0-dist/css/bootstrap.css" rel="stylesheet" >
    <script src="js/jquery.min.js"></script>
    <script src="./bootstrap-4.6.0-dist/js/bootstrap.js"></script>

    <link rel="stylesheet" type="text/css" href="verify/css/verify.css">
    <script type="text/javascript" src="verify/js/verify.js" ></script>
</head>
<body>
<div class="container-sm">
    <div class="row">
        <div class="col">
        </div>
        <div class="col-6">
            <div class="span12">
                <div class="row-fluid">
                    <div class="span6">
                        &nbsp;<h3>登录页面</h3>
                    </div>
                </div>

                <div class="row-fluid">
                    <div class="span6">
                        <p style="color: red">
                            ${errorMsg}
                        </p>
                    </div>
                </div>

                <form class="row g-1" action="login.do" method="post">
                    <input type="hidden" name="id" value="<%=request.getParameter("id")%>"/>
                    <input type="hidden" name="method" value="updatePassword"/>
                    <div class="col-md-12">
                        <label for="usercode" ><h5>用户名：</h5></label>
                        <input type="text" class="form-control" id="usercode" name="usercode" >
                    </div>
                    <div class="col-md-12">
                        <label for="password" ><h5>密码：</h5></label>
                        <input type="password" class="form-control" id="password" name="password" >
                    </div>

                    <div id="mpanel3" style="margin-top: 20px" >
                    </div>


                    <div class="col-12">
                        <button type="submit" class="btn btn-primary">登 录</button>
                        <a href="userinfo.jsp" class="btn btn-primary">注 册</a>
                    </div>
                </form>
            </div>
        </div>
        <div class="col">
        </div>
    </div>
</div>


<script>

    $('#mpanel3').codeVerify({
        type : 2,
        figure : 100,	//位数，仅在type=2时生效
        arith : 0,	//算法，支持加减乘，不填为随机，仅在type=2时生效
        width : '200px',
        height : '50px',
        fontSize : '30px',
        btnId : 'check-btn2',
        ready : function() {
        },
        success : function() {
            alert('验证匹配！');
        },
        error : function() {
            alert('验证码不匹配！');
        }
    });

</script>
</body>
</html>
